$(document).ready(function () {
    //客源地数据
    var cityData1 = ['河南', '山西','陕西','河北','江苏']
    var cityData1Reverse = ['江苏', '河北','陕西','山西','河南']
    var cityData2 = ['四川','安徽','山东','北京','湖北']
    var cityData2Reverse = ['湖北','北京','山东','安徽','四川']
    var datas11 = [80411, 83416, 90211, 92087,  523456];
    var datas21 = [34411,41014, 44011 , 50001, 54014];
    $('.place-box ul li').click(function () {
        let _index = $(this).index()
        $(this).addClass('active').siblings().removeClass('active')
        if (_index === 1){
            cityData1 = ['郑州', '许昌','太原','威海','平顶山']
            cityData1Reverse = ['平顶山', '威海','太原','许昌','郑州']
            cityData2 =  ['鸡西', '焦作', '郑州', '新乡', '邯郸']
            cityData2Reverse = ['邯郸', '新乡', '郑州', '焦作', '鸡西']
            datas11 = [20740, 25470, 34470, 40140, 51401];
            datas21 = [7001, 10044, 12001, 19801, 19014];
            myChart6(60000)
        }else {
            cityData1 = ['河南', '山西','陕西','云南','贵州']
            cityData1Reverse = ['贵州', '云南','陕西','山西','河南']
            cityData2 = ['四川','海南','广东','湖南','湖北']
            cityData2Reverse = ['湖北','湖南','广东','海南','四川']
            datas11 = [80411, 83416, 90211, 92087,  523456];
            datas21 = [34411,41014, 44011 , 50001, 54014];
            myChart6(600000)
        }
    })
    // 日期选择
    $('.date-select-list .date-tab>a').click(function(){
        $(this).addClass('active').siblings('a').removeClass('active')
        if($(this).text()=='日'){
            $(this).parent().siblings('.select-date-box').find('span').text('日期')
            $('#selectDate').removeClass('hd').siblings('input').addClass('hd')
        }
        if($(this).text()=='月'){
            $(this).parent().siblings('.select-date-box').find('span').text('月份')
            $('#selectMonth').removeClass('hd').siblings('input').addClass('hd')
        }
        if($(this).text()=='年'){
            $(this).parent().siblings('.select-date-box').find('span').text('年份')
            $('#selectYear').removeClass('hd').siblings('input').addClass('hd')
        }
    })
     //选择日
     laydate.render({
        elem: '#selectDate', //指定元素
        theme: '#37B866',
        range: true,
        trigger: 'click',
        min: -10,
        max: 0
    });
     //选择月
     laydate.render({
        elem: '#selectMonth', //指定元素
        theme: '#37B866',
        type: 'month',
         range: true,
         trigger: 'click',
    });
     //选择年
     laydate.render({
        elem: '#selectYear', //指定元素
        theme: '#37B866',
        type: 'year',
         range: true,
         trigger: 'click',
    });
    //地图
    function myChart1() {
        var myChart = echarts.init(document.getElementById('portrait_1'));
        var data = [
            {
                name: '齐齐哈尔'
            }, {
                name: '盐城'
            }, {
                name: '青岛'
            }, {
                name: '金昌'
            }, {
                name: '泉州'
            }, {
                name: '拉萨'
            }, {
                name: '上海浦东'
            }, {
                name: '攀枝花'
            }, {
                name: '威海'
            }, {
                name: '承德'
            }, {
                name: '汕尾'
            }, {
                name: '克拉玛依'
            }, {
                name: '重庆市'
            },{
                name: '北京市'
            },
            {
                name: '上海',
                value: 0
            }
        ];
        var chinaDatas = [
            {
                name: '黑龙江',
                value: 0
            },
            {
                name: '内蒙古',
                value:0
            },{
                name: '吉林',
                value:0
            },{
                name: '辽宁',
                value: 0
            },{
                name: '河北',
                value: 0
            },{
                name: '天津',
                value: 0
            },{
                name: '山西',
                value: 0
            },{
                name: '陕西',
                value: 0
            },{
                name: '甘肃',
                value: 0
            },{
                name: '宁夏',
                value: 0
            },{
                name: '青海',
                value: 0
            },{
                name: '新疆',
                value: 0
            },{
                name: '西藏',
                value: 0
            },{
                name: '四川',
                value: 0
            },{
                name: '重庆',
                value: 0
            },{
                name: '山东',
                value: 0
            },{
                name: '河南',
                value: 0
            },{
                name: '江苏',
                value: 0
            },{
                name: '安徽',
                value: 0
            },{
                name: '湖北',
                value:0
            },{
                name: '浙江',
                value: 0
            },{
                name: '福建',
                value:0
            },{
                name: '江西',
                value: 0
            },{
                name: '湖南',
                value: 0
            },{
                name: '贵州',
                value: 0
            },{
                name: '广西',
                value:0
            },{
                name: '海南',
                value: 0
            },{
                name: '上海',
                value: 0
            },{
                name: '北京',
                value: 0
            }
        ];
        var geoCoordMap = {

            '齐齐哈尔': [123.97, 47.33],
            '盐城': [120.13, 33.38],
            '青岛': [120.33, 36.07],
            '金昌': [102.188043, 38.520089],
            '泉州': [118.58, 24.93],
            '拉萨': [91.11, 29.97],
            '上海浦东': [121.48, 31.22],
            '攀枝花': [101.718637, 26.582347],
            '威海': [122.1, 37.5],
            '承德': [117.93, 40.97],
            '汕尾': [115.375279, 22.786211],
            '克拉玛依': [84.77, 45.59],
            '重庆市': [108.384366, 30.439702],
            '北京市': [116.4551,40.2539],
            '洛阳市':[112.462299,34.628066],
            '开封':[114.347061,34.815321],
            '郑州市':[113.646939,34.759134],
            '安阳市':[114.400257,36.106722],
            '鹤壁市':[114.308765,35.754702],
            '信阳市':[114.926033,32.011365],
            '上海': [121.4648, 31.2891],
            "泽州":[112.798426,35.599536]

        };
        var planePath = 'path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z';
        var dataFrom = '信阳市';
        myChart.setOption({
            series: [{
                type: 'map',
                map: 'china'
            }]
        });
        var convertData = function (data) {
            var res = [];
            for (var i = 0; i < data.length; i++) {
                var dataItem = data[i];
                var fromCoord = geoCoordMap[data[i].name];
                var toCoord = [114.918059,32.018601];

                if (fromCoord && toCoord) {
                    res.push([{
                        coord: fromCoord,
                        // value: dataItem[0].value
                    }, {
                        coord: toCoord,
                    }]);
                }
            }
            return res;
        };
        option = {
            tooltip: {
                trigger: 'item',
                formatter:function (data) {
                    return data.data.name +'游客数：' + data.value
                }
            },
            visualMap: {
                show:false,
                min: 0,
                max: 100,
                left: 'left',
                top: 'bottom',
                text: ['高', '低'],
                calculable: true,
                inRange: {
                    color:" rgba(147, 235, 248, .2)"
                }
            },
            toolbox: {
                show: false,
            },
            geo: {
                map: 'china',
                zoom: 1.2,
                label: {
                    normal: {
                        show: true,
                        color: '#c1c4c8'
                    },
                    emphasis: {
                        show: false,
                        color: '#292929'
                    }
                },

                roam: true,
                itemStyle: {
                    normal: {
                        borderColor: 'rgba(147, 235, 248, 1)',
                        borderWidth: 1,
                        areaColor: {
                            type: 'radial',
                            x: 0.5,
                            y: 0.5,
                            r: 0.8,
                            colorStops: [{
                                offset: 0,
                                color: 'rgba(147, 235, 248, 0)' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: 'rgba(147, 235, 248, .2)' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        shadowColor: 'rgba(128, 217, 248, 1)',
                        // shadowColor: 'rgba(255, 255, 255, 1)',
                        shadowOffsetX: -2,
                        shadowOffsetY: 2,
                        shadowBlur: 10
                    },
                    emphasis: {
                        areaColor: '#1deaaf',
                        borderWidth: 0
                    }
                }
            },
            series: [

                {
                    name: '洛阳',
                    type: 'lines',
                    zlevel: 2,
                    symbolSize: 10,
                    effect: {
                        show: true,
                        period: 6,
                        symbol: planePath,
                        trailLength: 0,
                        symbolSize: 15

                    },
                    lineStyle: {
                        normal: {
                            color:chartColor[0],
                            width: 2,
                            opacity:0.5,
                            curveness:0.2
                        }
                    },
                    label: {
                        show:false,
                        normal: {
                            show:false
                        },
                        emphasis: {
                            show: false
                        }
                    },
                    tooltip:{
                        show:false
                    },
                    data: data.map(function (dataItem) {
                        return {
                            fromName: dataFrom,
                            toName: dataItem.name,
                            coords: [
                                geoCoordMap[dataItem.name],
                                geoCoordMap[dataFrom]
                            ]
                        }
                    })
                },{
                    name: '游客数',
                    type: 'effectScatter',
                    coordinateSystem: 'geo',
                    data: convertData(data),
                    symbolSize: 8,
                    showEffectOn: 'render',
                    rippleEffect: {
                        scale: 5,
                        brushType: 'stroke'
                    },


                    hoverAnimation: true,
                    // label: {
                    //     show:false,
                    //     normal: {
                    //         formatter: '{b}',
                    //         position: 'right',
                    //         show: true
                    //     },
                    //     emphasis: {
                    //         show: true
                    //     }
                    // },
                    label: {
                        show:false,
                        normal: {
                            show:false
                        },
                        emphasis: {
                            show: false
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: '#c60fff',
                            shadowBlur: 20,
                            shadowColor: '#333'
                        }
                    }
                }, {
                    type: 'map',
                    mapType: 'china',
                    geoIndex: 0,
                    label: {
                        normal: {
                            show: true
                        },
                        emphasis: {
                            show: true
                        }
                    },
                    data:chinaDatas
                }]
        };
        myChart.setOption(option);
    }

    //男女
    function myChart2() {
        var myChart = echarts.init(document.getElementById('portrait_2'));
        var symbols = [
            'path://M115.3,45.3H104c5.7-1.9,9.8-7.2,9.8-13.5c0-7.8-6.4-14.2-14.2-14.2c-7.8,0-14.2,6.4-14.2,14.2c0,6.3,4.1,11.6,9.8,13.5  H83.8c-10,0-18.3,8.1-18.3,18.2v44c0,3.4,2.7,6.2,6.1,6.2c3.4,0,6.2-2.8,6.2-6.2V67.9H81v110.5c0,4.6,3.8,8.3,8.4,8.3  c4.6,0,8.3-3.7,8.3-8.3v-64.1h3.4v64.1c0,4.6,3.7,8.3,8.3,8.3c4.6,0,8.4-3.7,8.4-8.3V67.9h3.2v39.7c0,3.4,2.8,6.2,6.2,6.2  s6.1-2.8,6.1-6.2v-44C133.6,53.5,125.4,45.3,115.3,45.3z',
            'path://M135.6,99.4l-11.4-39.7c-4.6-15.9-17.8-15.4-17.8-15.4h-5.2c5.1-2.2,8.6-7.3,8.6-13.1c0-8-6.5-14.4-14.5-14.4  c-8,0-14.5,6.4-14.5,14.4c0,5.9,3.5,10.9,8.6,13.1h-5.1c0,0-13.3-0.5-17.8,15.4L55,99.4c-1.1,3.7,1,6.5,4.2,7.5  c3.2,0.9,6.5-0.7,7.4-3.7l11.1-38.7h3l-19.2,67h18.1v49.1c0,3.7,3.2,6.9,7.1,6.9c3.5,0,7.1-3.5,7.1-7.2v-48.8h2.9v48.8  c0,3.7,3.6,7.2,7.1,7.2c3.9,0,7.1-3.1,7.1-6.9v-49.1H129l-19.2-67h3l11.1,38.7c0.8,3,4.2,4.6,7.4,3.7  C134.6,105.9,136.6,103.1,135.6,99.4z',
        ];

        var bodyMax = 911;
        option = {

            grid: {
                left: '10%',
                right: '10%',
                top: '30%',
                bottom: "20%"
            },
            xAxis: {
                show: false,
                data: ['男', '女',],
                axisTick: {show: false},
                axisLine: {show: false},
                axisLabel: {show: false}
            },
            yAxis: {
                show: false,
            },

            markLine: {
                z: -100
            },

            tooltip: {
                show: true
            },
            series: [
                {
                    name: '人数',
                    type: 'pictorialBar',
                    symbolClip: true,
                    symbolBoundingData: bodyMax,
                    data: [{
                        value:510,
                        symbol: symbols[0]
                    }, {
                        value:401,
                        symbol: symbols[1]
                    },],
                    itemStyle: {
                        // color: '#fff'
                        color: (params) => {
                            let colors = ['#2ea6ff', '#ff5959',]
                            return colors[params.dataIndex]
                        }
                    },
                    z: 10,
                    symbolOffset: ["30%", 0],//柱子的位置
                    symbolSize: [30, 77],//size,单个symbol的大小
                    label:{
                        show:true,
                        position:'bottom',
                        formatter: function (data) {
                            let num = (data.value*100/315)
                            return data.name +'占比：'+num.toFixed(2) + "%"
                        }
                    }
                },
                {
                    name: '总数',
                    type: 'pictorialBar',
                    symbolBoundingData: bodyMax,
                    tooltip: {
                        show: false
                    },
                    // animationDuration: 0,
                    itemStyle: {
                        // color: '#fff'
                        color: (params) => {
                            let colors = ['rgba(46,166,255,.4)', 'rgba(255,89,89,.4)',]
                            return colors[params.dataIndex]
                        }
                    },
                    data: [{
                        value: bodyMax,
                        symbol: symbols[0]
                    }, {
                        value: bodyMax,
                        symbol: symbols[1]
                    }],
                    symbolOffset: ["30%", 0],//柱子的位置
                    symbolSize: [30, 77],//size,单个symbol的大小
                }
            ]
        };

        myChart.setOption(option);
    }

    //年龄
    function myChart3() {
        var myChart = echarts.init(document.getElementById('portrait_3'));
        let color=['#4B66C7','#9A4CFB','#E76D59','#53FCB3','#00E4FF']
        let data = [
            {value: 710, name: '18岁以下'},
            {value: 2501, name: '18-24岁'},
            {value: 2110, name: '25-39岁'},
            {value: 1814, name: '40-59岁'},
            {value: 1411, name: '60岁以上'}
        ]
        option = {
            tooltip: {
                trigger: 'item',
                formatter: '{a} <br/>{b} : {c} ({d}%)'
            },
            color:color,

            legend: {
                // show:false,
                right:'3%',
                top:'12%',
                orient:'vertical',
                icon: 'circle',
                textStyle: {
                    color: '#fff',
                }
            },
            series: [
                {
                    name: '',
                    type: 'pie',
                    radius: '55%',
                    center: ['35%', '50%'],
                    data,
                    roseType: 'radius',
                    label: {
                        color: 'rgba(255, 255, 255, 1)'
                    },
                    labelLine: {
                        lineStyle: {
                            // color: '#fff'
                        },
                        smooth: 0.2,
                        length: 10,
                        length2: 10
                    },


                    animationType: 'scale',
                    animationEasing: 'elasticOut',
                    animationDelay: function (idx) {
                        return Math.random() * 200;
                    }
                }
            ]
        };

        myChart.setOption(option);
    }
    // 停留时长
    function myChart4() {
        var myChart = echarts.init(document.getElementById('portrait_4'));
        var visits = [2712,1004,1320,910,4104]; //数值
        var grade = ['门票','线路','美食','住宿','购物'];
        var data = {
            grade: grade,
            // totalCost: totalCost,
            visits: visits,
        };
        option = {
            grid: {
                top:'8%',
                left:'10%',
                right: '5%',
                bottom: '-5%',
                containLabel: true

            },
            tooltip: {
                show: false
            },
            xAxis: {
                show: false
            },
            yAxis: [{
                type: 'category',

                axisTick: {
                    show: false
                },
                axisLine: {
                    show: false,
                },
                axisLabel: {
                    margin:70,
                    textStyle: {
                        align:'left',
                        fontSize: 12,
                        color: '#fff'
                    },
                },
                data: data.grade
            }, {
                show:false,
                type: 'category',

                axisLine: {
                    show: false
                },
                axisTick: {
                    show: false
                },
                axisLabel: {
                    textStyle: {
                        fontSize: 12,
                        color: '#fff',
                    },
                },
                splitArea: {
                    show: false
                },
                splitLine: {
                    show: false
                },
                data: data.visits
            }, ],
            series: [
                {

                    type: 'bar',

                    itemStyle: {
                        normal: {
                            show: true,
                            color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                                offset: 0,
                                color: 'rgba(55,184,102,0.3)'

                            }, {
                                offset: 1,
                                color: 'rgba(55,184,102,1)'

                            }]),
                            barBorderRadius: 0,
                            borderWidth: 0,
                            borderColor: '#333',
                        }
                    },
                    label: {
                        normal: {
                            position: 'right',
                            color:'#fff',
                            show:true,
                            formatter:function(params){
                                return params.value+'%'
                            }
                        }
                    },
                    barWidth: '30%',

                    data: data.visits
                }

            ]
        };

        myChart.setOption(option);
    }
    // 出行方式
    function myChart5() {
        var myChart = echarts.init(document.getElementById('portrait_5'));
        let color=['#4B66C7','#9A4CFB','#44D798','#E76D59','#53FCB3','#00E4FF']
       let data = [
           {value: 2240, name: '动车'},
           {value: 2541, name: '飞机'},
           {value: 4512, name: '自驾'},
           {value: 1010, name: '旅游大巴'}
       ]
        option = {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} %"
            },
            legend: {
                orient: 'vertical',
                x: 'right',
                data:['组团','自驾','普通火车','其他'],
                textStyle: {
                    color: '#fff',
                },
            },
            color:color,
            series: [
                {
                    name:'访问来源',
                    type:'pie',
                    radius: ['50%', '70%'],
                    avoidLabelOverlap: false,
                    label: {
                        normal: {
                            show: false,
                            position: 'center'
                        },
                        emphasis: {
                            show: true,
                            textStyle: {
                                fontSize: '20',
                                fontWeight: 'bold'
                            }
                        }
                    },
                    labelLine: {
                        normal: {
                            show: true,
                            length2:30
                        }
                    },
                    label: {
                        normal: {
                            formatter: function (params) {

                                return '{white|' + params.value + '%}'
                            },
                            rich: {
                                white: {
                                    color: '#fff',
                                    lineHeight: 20,
                                    textAlign: 'left',
                                    fontSize: '12px',
                                    fontFamily: 'PingFangSC'
                                }
                            }

                        }
                    },
                    data:data
                }
            ]
        };


        myChart.setOption(option);
    }
    //客源
    function myChart6(maxValue) {
        var myChart = echarts.init(document.getElementById('portrait_6'));
        var weatherIcons = {
            first: "../../assets/images/top-1.png",
            second: "../../assets/images/top-2.png",
            third: "../../assets/images/top-3.png",
            other: "../../assets/images/top-0.png"
        };
        var myColor = ['#4B66C7','#9A4CFB','#E76D59','#53FCB3','#00E4FF']

        function getsum(arr) {
            return arr.reduce(function (prev, curr, idx, arr) {
                return prev + curr;
            });
        }

        var sumarr = datas11.concat(datas21);
        var sum = getsum(sumarr);
        // console.log(sum);
        option = {
            grid: [
                {
                    width: "28%",
                    left: '13%',
                    top: '5%',
                    right: '0',
                    bottom: '5%'
                },
                {
                    width: "28%",
                    left: '70%',
                    top: '5%',
                    right: '0',
                    bottom: '5%'
                }
            ],
            xAxis: [
                {
                    gridIndex: 0,
                    show: false,
                }, {
                    gridIndex: 1,
                    show: false,
                }
            ],
            yAxis: [
                {
                    gridIndex: 0,
                    splitLine: 'none',
                    axisTick: 'none',
                    axisLine: 'none',
                    axisLabel: {
                        align: 'left',
                        padding: [0, 0, 0, -50],
                        textStyle: {
                            color: '#fff',
                            fontSize: '12px',
                            rich: {
                                a: {
                                    fontSize: 10,
                                    backgroundColor: {
                                        image: weatherIcons.first
                                    },
                                    align: 'center',
                                    color: '#fff',
                                    width: 17,
                                    height: 21,
                                },
                                b: {
                                    fontSize: 10,
                                    backgroundColor: {
                                        image: weatherIcons.second
                                    },
                                    align: 'center',
                                    color: '#fff',
                                    width: 17,
                                    height: 21
                                },
                                c: {
                                    fontSize: 10,
                                    backgroundColor: {
                                        image: weatherIcons.third
                                    },
                                    align: 'center',
                                    color: '#fff',
                                    width: 17,
                                    height: 24
                                },
                                d: {
                                    fontSize: 10,

                                    align: 'center',
                                    color: '#fff',
                                    width: 17,
                                    height: 24
                                }
                            }
                        },
                        formatter: function (params) {

                            var data = cityData1;
                            for (var i = 0; i < 5; i++) {
                                if (data[i] == params) {
                                    var j = i + 1
                                    if (i == 0) {
                                        return '{a|' + j + '} ' + params
                                    }
                                    if (i == 1) {
                                        return '{b|' + j + '} ' + params

                                    }
                                    if (i == 2) {
                                        return '{c|' + j + '} ' + params
                                    }
                                    if (i > 2) {
                                        return '{d| ' + j + '}' + params
                                    }
                                }

                            }
                        },
                    },

                    data: cityData1Reverse
                },
                {
                    gridIndex: 0,
                    splitLine: 'none',
                    axisTick: 'none',
                    axisLine: 'none',
                    data: []
                },
                {
                    gridIndex: 1,
                    splitLine: 'none',
                    axisTick: 'none',
                    axisLine: 'none',
                    axisLabel: {
                        align: 'left',
                        padding: [0, 0, 0, -50],
                        textStyle: {
                            color: '#fff',
                            fontSize: '12px',
                            rich: {
                                a: {
                                    fontSize: 10,
                                    width: 15,
                                    textAlign: 'center',
                                    color: '#14C6CA',

                                }
                            },
                        },

                        formatter: function (params) {
                            //
                            //
                            //
                            //
                            //
                            var data = cityData2;
                            for (var i = 0; i < 5; i++) {
                                if (data[i] == params) {
                                    var k = i + 6
                                    return '{a|' + k + '} ' + params
                                }
                            }
                        },
                    },
                    data: cityData2Reverse
                }, {
                    gridIndex: 1,
                    splitLine: 'none',
                    axisTick: 'none',
                    axisLine: 'none',
                    data: []
                }
            ],
            series: [
                {
                    name: '值',
                    type: 'bar',
                    xAxisIndex: 0,
                    yAxisIndex: 0,
                    data: datas11,
                    label: {
                        normal: {
                            show: true,
                            position: ['80%', '-12px'],
                            color: '#53fcb3',
                            fontSize: '10px',
                            // formatter: function (item) {
                            //     return item.value + '万' + '\xa0\xa0 ' + (item.value / sum * 100).toFixed(2) + '%'
                            // }
                        }
                    },
                    barWidth: '7px',
                    itemStyle: {
                        normal: {
                            //每根柱子颜色设置
                            color: function (params) {
                                var _this = this;
                                var index = params.dataIndex;
                                return myColor[index]
                            },
                            // color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                            //     offset: 0,
                            //     color: '#0090F8'
                            // }, {
                            //     offset: 1,
                            //     color: '#00C9FF'
                            // }]),
                            // color:myColor[index],
                            barBorderRadius: 50,
                        }
                    },
                    z: 2
                },
                {
                    type: "bar",
                    barWidth: 7,
                    xAxisIndex: 0,
                    barGap: "-100%",
                    data: [maxValue, maxValue,maxValue, maxValue,maxValue],
                    itemStyle: {
                        normal: {
                            color: "#444a58",
                            barBorderRadius: 14
                        }
                    },
                    zlevel: -1
                },
                {
                    name: '值',
                    type: 'bar',

                    xAxisIndex: 1,
                    yAxisIndex: 3,
                    data: datas21,
                    label: {
                        normal: {
                            show: true,
                            position: ['80%', '-12px'],
                            color: '#53fcb3',
                            fontSize: '10px',
                            // formatter: function (item) {
                            //     return item.value + '万' + '\xa0\xa0' + (item.value / sum * 100).toFixed(2) + '%'
                            // }
                        }
                    },
                    barWidth: '7px',
                    itemStyle: {
                        normal: {
                            color: "#53fcb3",
                            barBorderRadius: 50,
                        }
                    },
                    z: 2
                },
                {
                    type: "bar",
                    barWidth: 7,
                    xAxisIndex: 1,
                    yAxisIndex: 3,
                    barGap: "-100%",
                    data: [maxValue, maxValue,maxValue, maxValue,maxValue],
                    itemStyle: {
                        normal: {
                            color: "#444a58",
                            barBorderRadius: 14
                        }
                    },
                    zlevel: -1,
                    z: 2
                },

            ]
        };
        myChart.setOption(option);

        myChart.setOption(option);
    }

    myChart1()
    setTimeout(myChart2,600)
    setTimeout(myChart3,800)
    setTimeout(myChart4,1000)
    setTimeout(myChart5,1200)
    setTimeout(myChart6(600000),1400)
    laydate.render({
        elem: '#period', //指定元素
        range: true,
        theme: '#37B866',
        min:-30,
        max: 0
    });
    $(".scenic").M_select({
        // 手动添加下拉款图片（以html页面为起始位置写路径）
        "Img": "./assets/plugin/M_select/up6.png",
        "Img2": "./assets/plugin/M_select/down6.png",
        "radius": "4px",
        "Title": "选择景区",
        "inputName": "selected_value",
        // 默认选中的值（参数值写需要选中的select的value值）
        "selected": "2",
        Succee: function () {
            site = $('#select-scenic').val()
            console.log(site)
        }
    });
})
